<?php

namespace App\Kuafu\User\Enum;

use App\Kuafu\Base\Enum\BaseCodeEnum;

class UserCodeEnum extends BaseCodeEnum
{
    public const OK_LOGIN = 200;

    public const WEB_TYPE      = 1;
    public const POS_TYPE      = 2;
    public const APPLET_TYPE   = 3;
    public const MERCHANT_TYPE = 4;
    public const H5_TYPE       = 5;

    const PLATFORM_TYPE_TEXT = [
        self::WEB_TYPE      => "web",
        self::POS_TYPE      => "pos",
        self::APPLET_TYPE   => "applet",
        self::MERCHANT_TYPE => "merchant",
        self::H5_TYPE       => "h5",
    ];

    //用户中心-输入异常 401XXX
    public const ERR_USER_MOBILE_EXIST   = 401001;
    public const ERR_USER_NAME           = 401002;
    public const ERR_USER_PASSWORD_ONE   = 401003;
    public const ERR_USER_PASSWORD_TWO   = 401004;
    public const ERR_USER_PASSWORD_THREE = 401005;
    public const ERR_USER_PASSWORD_FOUR  = 401006;
    public const ERR_USER_MOBILE         = 401007;
    public const ERR_USER_PASSWORD       = 401008;
    public const ERR_USER_NOT_INPUT      = 401009;
    public const ERR_USER_STATUS         = 401010;
    public const ERR_USER_SMS_CODE       = 401011;
    public const ERR_USER_STATUS_STOP    = 401012;
    public const ERR_USER_NAME_REPEAT    = 401013;
    public const ERR_USER_NAME_EQUAL     = 401014;
    public const ERR_USER_HEALTH_CARD_END = 401015;
    public const ERR_MODIFY_INTERNAL_USER = 401016;
    public const ERR_USER_ID_CARD_EQUAL_HEALTH_CARD = 401017;
    public const ERR_USER_ID_CARD_OCR = 401018;
    public const ERR_SHOP_USER_MOBILE_EXIST = 401019;
    public const ERR_SHOP_USER_UPDATE_MOBILE = 401020;
    public const ERR_SHOP_UPDATE_USER_ROLE = 401021;


    //用户中心-系统异常 501XXX
    public const ERR_USER_NOT_EXIST  = 501001;
    public const ERR_USER_BLACK_LIST = 501002;
    public const ERR_USER_UPDATE     = 501003;
    public const ERR_USER_INSERT     = 501004;
    public const ERR_USER_PAYLOAD    = 501005;
    public const ERR_USER_MERCHANT_APP_LOGIN_NOT_EXIST    = 501006;  // 用户用户商家APP登录 账号不存在的提醒


    // 权限管理模块-输入异常405XXX
    public const ERR_PMS_NOT_INPUT = 405001;

    public const ERR_PMS_ROLE_PARAM_NAME        = 405002;
    public const ERR_PMS_ROLE_PARAM_NAME_LENGTH = 405003;
    public const ERR_PMS_ROLE_PARAM_BRAND_ID    = 405004;
    public const ERR_PMS_ROLE_PARAM_SHOP_ID     = 405005;
    public const ERR_PMS_ROLE_PARAM_STATUS      = 405006;
    public const ERR_PMS_ROLE_PARAM_ROLE_ID     = 405007;
    public const ERR_PMS_ROLE_PARAM_PERMISSION  = 405008;
    public const ERR_PMS_ROLE_DELETE_IN_USED    = 405009;
    public const ERR_PMS_ROLE_PARAM_ROLE        = 405010;

    // 权限管理模块-系统错误异常505XXX
    public const ERR_PMS_DB_ERR           = 505001;
    public const ERR_PMS_ID_NOT_EXIST     = 505002;
    public const ERR_PMS_ROLE_DEL         = 505003;
    public const ERR_PMS_USER_NOT_IN_SHOP = 505004;
    public const ERR_PMS_USER_NOT_SELECT  = 505005;

    // 系统配置模块 - 系统异常505XXX

    // 系统配置模块 - 系统异常505XXX

    public const CODE_TEXT = [

        self::OK_LOGIN                       => "登陆成功",
        self::ERR_USER_NOT_EXIST             => "用户不存在",
        self::ERR_USER_MOBILE_EXIST          => '用户名或者手机号已经被注册,请重新填写',
        self::ERR_USER_NAME                  => '用户名由2-16位数字或字母、汉字、下划线组成！',
        self::ERR_USER_PASSWORD_ONE          => '密码必须为8-16位的字符串！',
        self::ERR_USER_PASSWORD_TWO          => '密码必须包含字母,强度:弱！',
        self::ERR_USER_PASSWORD_THREE        => '密码必须包含数字,强度:中！',
        self::ERR_USER_PASSWORD_FOUR         => '密码只能包含数字和字母,强度:强！',
        self::ERR_USER_MOBILE                => '请填写正确的手机号码',
        self::ERR_USER_PASSWORD              => '用户名或密码错误',
        self::ERR_USER_BLACK_LIST            => '加入黑名单成功',
        self::ERR_USER_NOT_INPUT             => '参数错误',
        self::ERR_USER_UPDATE                => '修改失败，请稍后重试',
        self::ERR_USER_INSERT                => '注册失败，请稍后重试',
        self::WEB_TYPE                       => 'WEB',
        self::POS_TYPE                       => 'POS',
        self::APPLET_TYPE                    => 'APPLET',
        self::MERCHANT_TYPE                  => 'MERCHANT',
        self::H5_TYPE                        => 'H5',
        self::ERR_USER_PAYLOAD               => '您的账户不能跨平台登录',
        self::ERR_USER_STATUS                => '您的账户已被禁用，请联系管理员',
        self::ERR_USER_SMS_CODE              => '验证码输入错误，请重新输入',
        self::ERR_USER_NAME_REPEAT           => '用户名已存在，请更换用户名',
        self::ERR_USER_NAME_EQUAL            => '实名信息与填写名称不一致',
        self::ERR_USER_HEALTH_CARD_END       => '健康证已过期',
        self::ERR_MODIFY_INTERNAL_USER       => '不可以修改内部员工的姓名或者手机号',
        self::ERR_USER_ID_CARD_EQUAL_HEALTH_CARD => '身份证和健康证证件识别不一致',
        self::ERR_USER_ID_CARD_OCR           => '当前提交人数过多，请稍后再试',
        self::ERR_SHOP_USER_MOBILE_EXIST     => '该手机号已添加',
        self::ERR_SHOP_USER_UPDATE_MOBILE    => '不可修改手机号',
        self::ERR_SHOP_UPDATE_USER_ROLE      => '当前不可操作离职',


        self::ERR_USER_MERCHANT_APP_LOGIN_NOT_EXIST => '您的手机号暂未建档，请联系管理员',


        // 角色权限
        self::ERR_PMS_NOT_INPUT              => '参数错误',
        self::ERR_PMS_ROLE_PARAM_NAME        => "角色名称必填",
        self::ERR_PMS_ROLE_PARAM_NAME_LENGTH => "角色名称不能超过 20 位",
        self::ERR_PMS_ROLE_PARAM_BRAND_ID    => "关联的品牌为必填",
        self::ERR_PMS_ROLE_PARAM_SHOP_ID     => "关联的店铺为必填",
        self::ERR_PMS_ROLE_PARAM_STATUS      => "职位的状态必填, 且必须为 0 - 3 之间",
        self::ERR_PMS_ROLE_PARAM_ROLE_ID     => "职位有误",
        self::ERR_PMS_ROLE_PARAM_PERMISSION  => "权限列表提交有误",
        self::ERR_PMS_ROLE_DELETE_IN_USED    => "该职位正在使用,无法删除",
        self::ERR_PMS_ROLE_PARAM_ROLE        => "角色列表提交有误",

        self::ERR_PMS_DB_ERR       => '数据库操作异常',
        self::ERR_PMS_ID_NOT_EXIST => '该记录不存在',
        self::ERR_PMS_ROLE_DEL     => '该角色已被删除',

        self::ERR_PMS_USER_NOT_IN_SHOP => '用户没有关联的门店',
        self::ERR_USER_STATUS_STOP     => '账号已被禁用，请联系管理员',
        self::ERR_PMS_USER_NOT_SELECT  => '查询次数达到上限',
    ];
}
